Skip to content

fix(typing): Replace typing_extensions imports with standard typing i…#37

Merged
weilaaa merged 1 commit intomainfrom
fix/typing
Dec 1, 2025
Merged

fix(typing): Replace typing_extensions imports with standard typing i…#37
weilaaa merged 1 commit intomainfrom
fix/typing

Conversation

@Fengrui-Liu
Copy link
Collaborator

This pull request updates type imports throughout the codebase to improve compatibility and adhere to modern Python standards. The main change is replacing imports from typing_extensions with imports from the standard library's typing module where appropriate.

Type import modernization:

  • Replaced Literal import from typing_extensions with Literal from the standard library typing in veaiops/metrics/base.py.
  • Replaced TypedDict import from typing_extensions with TypedDict from the standard library typing in veaiops/metrics/timeseries.py.
  • Replaced override import from typing_extensions with override from the standard library typing in veaiops/utils/kb.py.…mports

Copilot AI review requested due to automatic review settings December 1, 2025 08:35
@Fengrui-Liu Fengrui-Liu self-assigned this Dec 1, 2025
@Fengrui-Liu Fengrui-Liu requested a review from weilaaa December 1, 2025 08:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request modernizes type hint imports by replacing typing_extensions with the standard library typing module. Since the project requires Python 3.12+, all the type constructs previously imported from typing_extensions (Literal, TypedDict, and override) are now available in the standard library, eliminating the need for the external package.

  • Consolidated imports from typing_extensions to the standard typing module
  • Updated three files to use modern Python 3.12+ typing features
  • Maintained proper import ordering and code style consistency

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
veaiops/utils/kb.py Moved override import from typing_extensions to standard typing module
veaiops/metrics/timeseries.py Replaced TypedDict import with standard library version
veaiops/metrics/base.py Moved Literal import from typing_extensions to standard typing module

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@weilaaa weilaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@weilaaa weilaaa merged commit 214441e into main Dec 1, 2025
14 checks passed
@weilaaa weilaaa deleted the fix/typing branch December 1, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants